<template>
	<view>
		<!-- <web-view src="https://api.map.baidu.com/marker?location=34.744584,113.649911&title=二七区大学路80号华城国际中心19层&output=html&src=yourAppName&zoom=15"></web-view> -->
		<web-view :src="url" :style="{ position: 'absolute', top: (0 + StatusBarRpx) + 'rpx', bottom: '0', width: '100%' }" />
		<!-- <view class="index_contact">
			<view class="index_commen index_white">
				<span>北京中犇教育科技感谢您的一路陪伴，我们将做的更好！</span>
			</view>
			<view class="contact_box">

				<view class="">
					<p class="tips">全国服务热线</p>

					<view class="bottom content">
						<span class="iconfont">
							<image src="https://zzzh.zhuaizhuaiyu.com/xcxgw/images/ph_m.png" alt=""></image>
						</span>
						13021110777
						<text @click="tel" class="copy_box dial">拨打</text>
					</view>

				</view>
				<view class="">
					<p class="tips">微信客服</p>

					<view class="bottom content">
						<span class="iconfont">
							<image src="https://zzzh.zhuaizhuaiyu.com/xcxgw/images/wwx.png" alt=""></image>
						</span>
						13021110777
						<view class="copy_box id_copy" @click="copy" style="background-color: #0053B8;">复制</view>
					</view>
				</view>

			</view>
			<view style="width:100%;justify-content:center;display:flex;margin-top:20px">
				<image style="width:120px;height:120px" src="https://zzzh.zhuaizhuaiyu.com/xcxgw/images/ewm.png"
					alt="" />
				</image>
			</view>
			   <view class="map">
		        <view class="map_bar">
		            <view>
						 <span :class="index==active?'act':''" v-for="(item,index) in arr" @click="gxmap(index)">{{item[3]}}</span>
		            </view>
		
		        </view>
		
		        <view id="allmap">
					  <map style="width: 686rpx; height: 180px;" :latitude="latitude" :longitude="longitude" :markers="covers"></map>
		        </view>
		
		    </view>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				active:0,
				latitude: '',
				longitude: '',
				covers:[
					{
					  latitude: '',
					  longitude: '',
					  iconPath: '',
					  width: '40',
					  height: '40',
					  callout: {
					    content: '我的',
					    fontSize: '16',
					    borderRadius: '10',
					    bgColor: '#fff'
					  }
					},
				],
				url:'https://zzzh.zhuaizhuaiyu.com/map/index_m.html',
				arr:[
					[116.467254, 39.911014,"朝阳区建外soho东区A座2310室", '北京'],
					 [113.649911, 34.744584, "二七区大学路80号华城国际中心19层", '郑州'],
					 [121.539173,31.23086, "浦东新区世纪大道1500号东方大厦417室", '上海'],
					 [108.95,34.34, "未央区正尚国际金融广场A座9层", '西安'],
					 [113.325463,23.132829, "天河区保利克洛维中景B座1705室", '广州'],
					 [117.256627,31.857082, "蜀山区西园街道万科金域国际写字楼主楼903", '合肥'],
					 [113.95,22.54, "南山区大冲商务中心C座701室", '深圳'],
					 [120.25,30.24, "萧山区钱江世纪城保亿中心B座2901室", '杭州'],
					 [116.903221,36.685004, "济南市槐荫区中建锦绣广场1--3101室", '济南'],
					[123.433731, 41.769214, "沈阳市和平区三好街96号同方广场B座4001-4003", '沈阳'],
					[112.977927,28.208351, "开福区芙蓉中路CFC富兴时代T3栋14005室", '长沙'],
					[118.79,31.97, "雨花台区绿地之窗C3座301-304室", '南京'],
					[114.30,30.60, "江岸区京汉大道铂仕汇国际广场1805室", '武汉'],
					[ 113.60,34.80,"郑州市大学科技园东区18号楼D座10层", '物联网中心'],
				],
			};
		},
		onShow() {
			this.gxmap(0)
		},
		methods: {
			
			tel() {
				uni.makePhoneCall({
					phoneNumber: '13021110777'
				});
			},
			copy() {
				uni.setClipboardData({
					data: '13021110777',
					success: function() {
						console.log('success');
					}
				});
			},
			gxmap(index){
				this.active=index
				this.latitude=this.arr[index][1]
				this.longitude=this.arr[index][0]
				this.covers[0].latitude=this.latitude
				this.covers[0].longitude=this.longitude
				this.covers[0].callout.content= this.arr[index][2]
				console.log(this.latitude)
				console.log(this.longitude)
				console.log(this.covers)
			},
		},
	}
</script>

<style lang="scss">
	.index_contact {
		margin-bottom: 20px;
		background: url("https://zzzh.zhuaizhuaiyu.com/m/img/m_footer_bg.png") no-repeat center 0;
		background-size: 100% 100%;
		padding: 30px 10px 25px 10px;
		width: 100%;
		height: 100%;
	}

	.index_white p {
		font-size: 17px;
		color: #FFFFFF;
		text-align: center;
		font-weight: bold;
		position: relative;
		padding: 0 15px;
		width: 140px;
		margin: 0 auto;
	}

	.index_white span {
		display: block;
		font-size: 12px;
		color: #FFFFFF;
		text-align: center;
		margin: 16px auto 0 auto;
	}

	.contact_box {
		padding: 15px 0 15px 0;
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-bottom: 1px solid #434343;
	}

	.contact_box .tips {
		font-size: 12px;
		color: #999;
	}

	.contact_box .bottom {
		margin-top: 10px;
		font-size: 13px;
		color: #fff;
	}

	.contact_box .iconfont {
		color: #fff;
		/*margin-right: 5px;*/
	}

	.content {
		display: flex;
		flex-wrap: wrap;
		/*justify-content: space-between;*/
	}

	.copy_box {
		width: 30px;
		height: 20px;
		line-height: 19px;
		font-size: 12px;
		color: #FFFFFF;
		text-align: center;
		border-radius: 8px;
		margin-left: 5px;
	}

	.dial {
		background-color: #FF7327;
	}

	.iconfont image {
		width: 17px;
		height: 17px;
		margin-right: 5px;
	}
	.map_bar {
	    /*height: 30px;*/
	    margin: 20px 0 0;
	    overflow: hidden;
	
	}
	
	.map_bar view {
	    /*white-space: nowrap;*/
	    overflow-x: scroll;
	    /*height: 30px;*/
	    font-size: 13px;
	}
	
	.map_bar span {
	    float: left;
	    display: inline-block;
	    width: 22%;
	    height: 30px;
	    line-height: 30px;
	    /*padding: 0 12px;*/
	    border: 1px solid rgba(109, 109, 109, 1);
	    border-radius: 4px;
	    font-size: 13px;
	    color: #6D6D6D;
	    margin-right: 2%;
	    margin-bottom:15px;
	    text-align: center;
	
	}
	
	.map_bar span:nth-child(4n){margin-right:0}
	.map_bar span:nth-child(4n-3){margin-left:2%}
	.map_bar span.act {
	    color: #FF6D01;
	    border: 1px solid #FF6D01;
	}
	
	#allmap {
	    width: 100%;
	    height: 180px;
	    margin: 0px 0 30px;
	}
</style>
